/*
 * @Descripttion: 
 * @Author: zhaozheng
 * @Version: 0.0.1
 * @Date: 2022-09-20 15:08:23
 * @LastEditors: zhaozheng
 * @LastEditTime: 2022-09-28 17:50:09
 */

import { createWebHistory, createWebHashHistory,  createRouter, RouteRecordRaw } from 'vue-router'
import Home from "@/components/HelloWorld.vue";


//vue2 mode history vue3 createWebHistory
//vue2 mode  hash  vue3  createWebHashHistory
//vue2 mode abstact vue3  createMemoryHistory
 
//路由数组的类型 RouteRecordRaw
// 定义一些路由
// 每个路由都需要映射到一个组件。
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "Home",
    component: Home
  }
];
const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
